* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Console', cursive, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffe0e0, #fff3e0);
    color: #333;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    animation: pulse 2s infinite;
}

.sidebar {
    width: 250px;
    background: #fff;
    border-right: 3px solid #ff6b6b;
    padding: 1rem;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(255, 107, 107, 0.2);
}

#chat-history li {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    background: #ffeef0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

#chat-history li:hover {
    transform: scale(1.05);
    background: #ffd6d6;
}

/* 中间聊天窗口 */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

#chat-bubbles {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><path fill="#ff6b6b33" d="M0 0h40v40H0z"/><circle cx="10" cy="10" r="2" fill="#ff6b6b66"/><circle cx="30" cy="30" r="3" fill="#ff6b6b66"/></svg>') repeat;
}
.logo{
    display: flex;
    font-size: large;
    font-weight: bolder;
    justify-content: center;
    align-items: center;
    height: 100px;
    background: #fff;
    padding: 1rem;
}
.chat-bubble {
    max-width: 70%;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 20px 5px 20px 20px;
    line-height: 1.5;
    position: relative;
    animation: float 1s ease-out;
}

.user-bubble {
    align-self: flex-end;
    background: #ff6b6b;
    color: white;
    border-radius: 5px 20px 20px 20px;
}

.bot-bubble {
    align-self: flex-start;
    background: #fff;
    border: 2px dashed #ff6b6b;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.2);
}

.bot-bubble::before {
    content: " Tina say: ";
    position: absolute;
    left: -60px;
    top: 5px;
    color: #ff6b6b;
    font-weight: bold;
}

/* 右侧配置面板 */
.tool-panel {
    width: 300px;
    background: #fff0f3;
    border-left: 3px solid #ff6b6b;
    padding: 1rem;
    overflow-y: auto;
}

form label {
    display: block;
    margin-bottom: 1rem;
    background: #ffe6e6;
    padding: 0.5rem;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
}

form select,
form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    font-family: inherit;
}

button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.3);
    transition: all 0.3s;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.5);
}

#tool-output {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 2px dashed #ff6b6b;
    border-radius: 15px;
    animation: pop 0.5s ease-in;
}

/* 动画效果 */
@keyframes float {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(2deg);
    }

    10% {
        transform: rotate(-2deg);
    }

    15% {
        transform: rotate(2deg);
    }

    20% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar,
    .config-panel {
        width: 100%;
        border: none;
        border-bottom: 3px solid #ff6b6b;
    }

    .chat-bubble {
        max-width: 90%;
    }
}

/* 欢迎页样式 */
.welcome-page {
    background: linear-gradient(135deg, #fff0f0, #ffe5e5);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-container {
    max-width: 600px;
    padding: 2rem;
    width: 90%;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.2);
    border: 3px solid #ff6b6b;
}

.config-form .form-group {
    margin-bottom: 1.5rem;
    background: #ffe6e6;
    padding: 1rem;
    border-radius: 15px;
    border-left: 4px solid #ff6b6b;
}

.config-form input,
.config-form select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    margin-top: 0.5rem;
    font-family: 'Comic Sans MS';
}

.submit-btn {
    background: #ff6b6b;
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.loading {
    text-align: center;
    color: #ff6b6b;
    padding: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.docs-link {
    color: #ff6b6b;
    text-decoration: none;
    border-bottom: 2px dotted;
}

.animate-pop {
    animation: pop 0.5s ease-in-out;
}